package cn.wans;

import cn.wans.service.impl.UserServiceImpl;
import org.junit.Test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * @author wans
 * @create 2022-10-21 20:12
 */
public class SpringTest {
    @Test
    public void test(){
        ApplicationContext context=new ClassPathXmlApplicationContext(
                "applicationContext.xml");
        UserServiceImpl service = context.getBean("userService", UserServiceImpl.class);
        boolean login = service.login("万义广", "2020754150");
        if (login){
            System.out.println("登入成功");
        }else{
            System.out.println("登入失败");
        }

    }
}
